package ExerciseOne;
/*
 * 多态举例
 * 
 */
public class PersonTest {

	public static void main(String[] args) {
		PersonTest p = new PersonTest();
		p.fuc(new Person());
		System.out.println("***************");
		p.fuc(new Mj());
		System.out.println("***************");
		p.fuc(new keb());
	}
	
	public void fuc(Person person)
	{
		person.tiaotou();
		person.koulan();
	}
}

class Person
{
	public void tiaotou()
	{
		System.out.println("跳投");
	}
	
	public void koulan()
	{
		System.out.println("扣篮");
	}
}
class Mj extends Person
{
	public void tiaotou()
	{
		System.out.println("背打转身加跳投");
	}
	
	public void koulan()
	{
		System.out.println("罚球线起跳");
	}
}

class keb extends Person
{
	public void tiaotou()
	{
		System.out.println("后仰跳投");
	}
	
	public void koulan()
	{
		System.out.println("经典反扣");
	}
}